﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Core.Interfaces;
using Core.Interfaces.IPresenters;
using Core.Unity;
using Microsoft.Practices.Unity;

namespace Core.Controls
{
    public partial class JurajialPersonControll : UserControl, ICustomerControl
    {
        private IJuridicalPerson _juridicalPerson;
        public JurajialPersonControll(IJuridicalPerson juridicalPerson = null)
        {
            InitializeComponent();
            if (juridicalPerson == null)
            {
                _juridicalPerson = ResolverContainer.Resolver.Resolve<IJuridicalPerson>();
            }
            iJuridicalPersonBindingSource.DataSource = _juridicalPerson;
        }

        public BindingSource AdditionalModel
        {
            get { return iJuridicalPersonBindingSource; }
            set { iJuridicalPersonBindingSource = value; }
        }
    }
}
